package com.entity;
// default package

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * Resources entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "RESOURCES")
public class ResourcesEntity implements java.io.Serializable {

	// Fields

	private String id;
	private String name;
	private String holder;
	private String reason;
	private Date createDate;
	private List<ResourcesSignRecordEntity> resourcesSignRecordEntitys = new ArrayList<ResourcesSignRecordEntity>();

	// Constructors

	@OneToMany(cascade=CascadeType.ALL,mappedBy="resourcesEntity")
	public List<ResourcesSignRecordEntity> getResourcesSignRecordEntitys() {
		return resourcesSignRecordEntitys;
	}

	public void setResourcesSignRecordEntitys(List<ResourcesSignRecordEntity> ResourcesSignRecordEntitys) {
		this.resourcesSignRecordEntitys = ResourcesSignRecordEntitys;
	}

	/** default constructor */
	public ResourcesEntity() {
	}

	/** minimal constructor */
	public ResourcesEntity(String id) {
		this.id = id;
	}

	/** full constructor */
	public ResourcesEntity(String id, String name, String holder, String reason, Date createDate) {
		this.id = id;
		this.name = name;
		this.holder = holder;
		this.reason = reason;
		this.createDate = createDate;
	}

	// Property accessors
	@Id
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid2")
	@Column(name = "ID")
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "NAME")
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "HOLDER")
	public String getHolder() {
		return this.holder;
	}

	public void setHolder(String holder) {
		this.holder = holder;
	}

	@Column(name = "REASON")
	public String getReason() {
		return this.reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	@Column(name = "CREATE_DATE")
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

}